<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "">
</@frame.head>
<html>
<head>
	<meta charset="UTF-8">
	<title>精讲列表</title>
	<link rel="stylesheet" type="text/css" href="${contextPath}/resources/css/courses/css/reset.css">
	<link rel="stylesheet" type="text/css" href="${contextPath}/resources/css/courses/font/iconfont.css">
	<link rel="stylesheet" type="text/css" href="${contextPath}/resources/css/courses/css/classList.css">

</head>
<body>
<div id="classList">
   <form method="post" name="query_product_form"  id="query_product_form" action="${contextPath}/finetTalk/Backstagespeak_release" >    
   <input type="hidden" name="page" value="${pagination.pageNo}"  id="page" />  
   <input type="hidden" name="checkboxs" value="${checkboxs}"  id="checkboxs" />
   <input type="hidden" name="upOrDown" value="${upOrDown}"  id="upOrDown" />                           
    <div class="text-c">
        <table class="table search_table">
           <tr>  
				发布人:&nbsp;&nbsp;<input type="text" class="input-text" style="width:250px" placeholder="输入发布人名称" id="" value="${finetTalkQo.niciName}"  name="niciName">&nbsp;&nbsp;精讲标题名称:&nbsp;&nbsp;<input type="text" class="input-text" style="width:250px" placeholder="输入标题名称" value="${finetTalkQo.title}" id="" name="title">
		&nbsp;&nbsp;<button type="submit" class="btn btn-success radius" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜文章</button>
          </tr>
      </table>
    </div>
</form>
	<!-- 头部 -->
	<div class="classLTop clearfix">
		<h2><i class="iconfont">&#xe65e;</i><b>精讲列表</b></h2>
		<input type="button"  onclick="addroles();"  value="精讲发布" />
		
	</div>
	<!-- 下面是精讲 -->
	<div class="classLCont clearfix">
		<#list pagination.list as list>
		<div class="cList">
			<img class="img" src="${webPath}/finetTalk/${list.imge}">
			<div class="text">
				<h2 class="title">${list.title}</h2>
			</div>
			<p class="datetime">发布时间：<span class="date">${(list.releasetime?string("yyyy-MM-dd"))!}</span></p>
			<div class="operate">
				<a  href="javascript:;" type="button"  onclick="updaFinetTalk(${list.finetTalkid?c});" class="reset">修改</a><span> /</span>
				<a href="#" onclick="look(${list.finetTalkid?c})" class="check">查看</a><span> /</span>
				<a href="javascript:;" type="button" onclick="delroles(${list.finetTalkid?c});" class="del">删除</a>
			</div>
			
		</div>
	</#list>
	
	</div>
	<div id="div_page" style="padding-top: 10px;float: right"></div>

</div>

</body>
<@frame.end "default">
</@frame.end>
<script type="text/javascript" src="${contextPath}/resources/js/system/finettalk.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript"
	src="${contextPath}/resources/js/laypage/laypage.js"></script>
<script type="text/javascript">
    var path="${contextPath}";
    laypage({
        cont: 'div_page',//容器。值支持id名、原生dom对象，jquery对象。
        pages: ${pagination.totalPage},//通过后台拿到的总页数
        curr:  ${pagination.pageNo} || 1, //当前页
        skip: true, //是否开启跳页
        first: false, //将首页显示为数字1,。若不显示，设置false即可
        last: ${pagination.totalPage},
    jump: function(obj , first){//触发分页后的回调
        if(!first){ //点击跳页触发函数;当前页为obj.curr
            window.location.href = path + "/finetTalk/Backstagespeak_release?page=" + obj.curr
        }
    }
    })
    
    function look(id){
    	var url=path+"/finetTalk/backstagespeak_view?finetTalkid="+id;
    	if(url!=""){
  	      var index = layer.open({
  	            type: 2,
  	            title: '查看文章',
  	            scrollbar: false,
  	            maxmin: true,
  	            content: url,
  	            area: ['500px', '500px']
  	        });
  	    layer.full(index);
  	    }
    }
    function addroles(){
	var url=path+"/finetTalk/speak_addTz"
	
	if(url!=""){
	      var index = layer.open({
	            type: 2,
	            title: '添加文章',
	            scrollbar: true,
	            maxmin: true,
	            content: url,
	            area: ['500px', '290px']
	        });
	      layer.full(index);
	    }
    }
    
    
    function updaFinetTalk(id){
  	  var url=path+"/finetTalk/backstagespeak_modify?finetTalkid="+id
  	   if(url!=""){
  	      var index = layer.open({
  	            type: 2,
  	            title: '修改文章',
  	            scrollbar: false,
  	            maxmin: true,
  	            content: url,
  	            area: ['700px', '600px']
  	        });
  	    layer.full(index);
  	    } 
  }


  
</script>
</html>
